package com.kexinxin.util.matching;

import java.util.List;

public class Compatibility {
	public static double getCompatibility(String resumePath, String requirementPath) {
		double rate;
		List<String> resumeSkillList = Recommend.getKeyWord(resumePath);
		List<String> requirementPathList = Recommend.getKeyWord(requirementPath);
		int count = 0;
		for (int i = 0; i < resumeSkillList.size(); i++) {
			if (requirementPathList.contains(resumeSkillList.get(i))) {
				count++;
			}
		}
		rate = (double) count / requirementPathList.size();
		return rate;
	}

	public static void main(String[] args) {
		System.out.println(getCompatibility("D://b.doc","D://a.doc"));
	}
}
